<link rel="stylesheet" href="https://file.viplgw.cn/ui/thinku-ielts-new/css/evaluation/question.css">
<script src="/cn/js/jquery-1.12.2.min.js"></script>
<div class="head">
    <input id="startTime" value="" type="hidden">
    <input id="maxtime" value="<?php echo $totalTime ?>" type="hidden">
    <input type="hidden" value="<?php echo isset($_GET['subjectId']) ? $_GET['subjectId'] : 1 ?>" id="subjectId">
    <input type="hidden" value="<?php echo isset($_GET['pubId']) ? $_GET['pubId'] : 1 ?>" id="pubId">
    <input type="hidden" value="<?php echo $nextSubject != false ? $nextSubject : 0 ?>" id="nextSubjectId">
    <input type="hidden" value="<?php echo $cateData['type'] ?>" id="type">
    <div class="container">
        <p class="headTitle">申友雅思-<?php echo $cateData['pidName'] ?>测评-<?php echo $cateData['name'] ?></p>
        <p class="timeStr"><img
                    src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/result/cuttime.png"><span></span></p>
        <p  class="quiteBtn" onclick="quite()"><img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/result/quite.png">Quit</p>
    </div>
</div>
<!--        阅读-->
<div class="container main">
    <div class="read_box flex_box">
        <div class="flex_item">
            <div>

                <?php echo $list[0]['parent']['name'] ?> </div>
            <!--            <p class="section_title">Directions:</p>-->
            <!--            <div class="directions_text">WORD CHOICE-->
            <div class="original_text">
                <?php echo $list[0]['parent']['article'] ?>
            </div>
        </div>

        <div class="flex_item">

            <p class="section_title">Questions:</p>
            <div class="question_content" style="display:block;height: calc(100% - 95px);overflow-y: auto;margin-bottom: 10px">

                <?php foreach ($list as $ke => $val) { ?>
                    <ul class="question_list" >
                        <p><?php echo $val['parent']['question'] ?></p>

                        <?php if ($val['parent']['questionType'] == 2) {
                            foreach ($val['son'] as $k => $v) {

                                ?>
                                <li class="question_item">
                                    <p class="question_title"><?php echo $v['name'] ?>. <?php echo $v['article'] ?></p>
                                    <ul class="question_options">
                                        <?php foreach ($v['option'] as $key => $value) { ?>
                                            <li class="question_option"
                                                onclick="chooseOption(this,<?php echo $v['id'] ?>,&apos;<?php echo chr(ord('A') + intval($key)) ?>&apos;,&apos;<?php echo $v['answer'] ?>&apos;)">
                                                <span><?php echo chr(ord('A') + intval($key)) ?></span><?php echo ltrim(substr($value,2)) ?>
                                            </li>
                                        <?php } ?>
                                    </ul>
                                </li>
                            <?php }
                        } elseif ($val['parent']['questionType'] == 1) {
                            foreach ($val['son'] as $k => $v) { ?>
                                <p>
                                    <?php
                                    $substr = '<input class="gap_filling" oninput="vocabulary(this,' . $v['id'] . ',&apos;' . $v['answer'] . '&apos;)">';
                                    echo $v['article'] != false ? $v['name'] . '.' . str_replace('&#', $substr, $v['article']) : '';
                                    ?>
                                </p>
                                <?php
                            }
                        }
                        ?>
                    </ul>
                <?php } ?>
            </div>

            <p class="next_btn">
                <button class="" onclick="saveAnswer()">Next ></button>
            </p>
        </div>
    </div>

</div>
<div class="next_modal question_modal" style="display: none">
    <div class="modal_dialog">
        <div class="modal-title">
            Response Required
            <img onclick="closeModal(this)" src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/close.png">
        </div>
        <div class="modal-body">
            <img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/warning.png">

            <p>要先选择答案才能继续下一题哦</p>
        </div>
        <div class="modal-footer">
            <button class="nextBtn" onclick="closeModal(this)">OK</button>
        </div>
    </div>
</div>
<div class="next_modal  Quite_modal" style="display: none">
    <div class="modal_dialog">
        <div class="modal-title">
            Quite
            <img onclick="closeModal(this)" src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/close.png">
        </div>
        <div class="modal-body">
            <img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/warning.png">

            <p>是否确定退出，退出将不保留测评记录</p>
        </div>
        <div class="modal-footer">
            <button class="noBtn" onclick="closeModal(this)">No</button>
            <button class="yesBtn" onclick="pageBack()">Yes</button>
        </div>
    </div>
</div>
<script src="/cn/js/evaluation/public.js"></script>
<script>
    var startTime = Math.ceil(new Date().getTime() / 1000); //单位秒
    $('#startTime').val(startTime);
    cutTime();
</script>

